package com.afei.java.ai.langchain4j.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @Title: ChatMessage
 * @Author wangyf
 * @Package com.afei.java.ai.langchain4j.bean
 * @Date 2025/4/24 15:16
 * @description: mongodb中的记忆类实体
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document
public class ChatMessage {

    //唯一标识,映射到Mongodb，文档的_id字段
    @Id
    private ObjectId messageId;

    private String memoryId;
    private String content; //存储当前聊天记录列表的json字符串
}
